package br.com.scmimebr.util;

import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
import javax.faces.convert.Converter;

import br.com.scmimebr.enums.Ufs;

public class UfConverter implements Converter{

	@Override
	public Object getAsObject(FacesContext facesContext, UIComponent component, String valor) {
		return Enum.valueOf(Ufs.class, valor);
	}

	@Override
	public String getAsString(FacesContext facesContext, UIComponent component, Object valor) {
		return valor.toString();
	}
	
	

}
